package text_2023_09_22;

import java.util.Scanner;

/**
 * @author Vv
 * @version 1.0
 * @project coding_learn
 * @description
 * @date 2023/9/22 09:32:17
 */
public class isPNum {
    public int Num;
    public isPNum(int num){
        this.Num = num;
    }
    public boolean isP(){
        String s = String.valueOf(Num);
        char[] str = s.toCharArray();
        boolean isP = true;
        int index1 = 0;
        int index2 = str.length - 1;
        while (isP && index1 <= index2){
            isP = str[index1++] == str[index2--] ? true : false;
        }
        return isP;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        isPNum i = new isPNum(num);
        System.out.println(i.isP());
    }
}
